﻿using HttpHelper;
using System;

namespace demo
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            //全局设置   多线程安全
            WinHttpClient Client = new WinHttpClient();
            _ = Client.Cookie;//线程安全   同步 统一 Cookies 从而达到多线程求情的效果

            WinHttp http = new WinHttp(Client);
            http.Open(Method.GET, "https://www.baidu.com/");
            var data = http.Send();
            Console.WriteLine(data.Text);
            Console.Read();
        }
    }
}